<template>
    <div>
        <child msg="分数" ref="child"></child>
        <br/>
        <br/>
        <br/>
        <button @click="plusHandler">加2分</button>
    </div>
</template>

<script>
    import child from "./child"

    export default {
        name: "index",
        components: {
            child
        },
        methods: {
            plusHandler() {
                this.$refs.child.plusHandler(2)
            }
        }
    }
</script>

<style scoped>

</style>
